#ifndef _XNODETYPE_FACTORY_H_
#define	_XNODETYPE_FACTORY_H_
/*------------------------------------------------------------
2009/4/7 By YPC

--------------------------------------------------------------
*/


#include <vector>
#include "xMappingNode.h"
using namespace std ;


class Factory_parameter {
public:
	const static int VM = 0 ;
	const static int WOP = 1 ;
	const static int TYPE = 2 ;
	Factory_parameter() { _type = VM ; }
	Factory_parameter(WOP_Entry* en) { _type = WOP; _en = en ; } 
	Factory_parameter(string typestr) { _type = TYPE ; _typestring = typestr ; }
	Factory_parameter(DIVA_VM * vm) { _type = VM ; _vm = vm; }
	int _type ;
	WOP_Entry* _en ;  // used for create a wop xNodeType
	string _typestring ; // used for create a pipe xNodeType ;
	DIVA_VM * _vm;
};
class Factory_xNodeType{
public:
	static xNodeType * create_xnodetype(int index, Factory_parameter fp); // index is the array index of the xmnt_library
	static xNodeType * create_xnodetype(string name, Factory_parameter fp); 
	static xNodeType * create_xnodetype(string name) ;
	
};

#endif 